package router

import (
	"github.com/gin-gonic/gin"
	"zg4/online-retailers/api-gateway/handler"
)

func LoadRouter(r *gin.Engine) {

	apiRouter := r.Group("/api")
	{
		products := apiRouter.Group("/products")
		{
			products.POST("/add", handler.AddProduct)
			products.GET("/list", handler.ProductList)

			products.POST("/group_buy", handler.GroupBuy)
			products.GET("/group_buy_info", handler.GroupBuyInfo)
		}
	}
}
